package com.cmc.cloud.cmclink.doc.rpcservice.vo;

import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.ToString;
import org.hibernate.validator.constraints.Length;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.time.LocalDate;
import java.time.LocalDateTime;
import java.util.List;

/**
 * 航线响应
 * @author heguo
 * @date 2025/10/23
 */
@Schema(description = "航线响应")
@Data
@ToString(callSuper = true)
public class LaneRespVO {
    @Schema(
            description = "主键",
            requiredMode = Schema.RequiredMode.REQUIRED,
            example = "28435"
    )
    private Long id;
    @Schema(
            description = "航线合作方：根据partnerType区分，false表示船舶经营人，true表示舱位经营人"
    )
    private List<LaneOneRespVO> lanePartnerList;
    @Schema(
            description = "投船信息"
    )
    private List<LaneVesselRespVO> laneVesselList;
    @Schema(
            description = "港序信息"
    )
    private List<LaneRespVO> laneList;
    @Schema(
            description = "创建人"
    )
    private String creator;
    @Schema(
            description = "创建时间"
    )
    private LocalDateTime createTime;
    @Schema(
            description = "更新人"
    )
    private String updater;
    @Schema(
            description = "更新时间"
    )
    private LocalDateTime updateTime;

    @Schema(
            description = "航线编号",
            requiredMode = Schema.RequiredMode.REQUIRED
    )
    private @NotBlank(
            message = "航线编号不能为空"
    ) @Length(
            max = 50,
            message = "航线编号长度最大为50"
    ) String laneCode;
    @Schema(
            description = "航线中文名称",
            requiredMode = Schema.RequiredMode.REQUIRED
    )
    private @NotBlank(
            message = "航线中文名称不能为空"
    ) @Length(
            max = 50,
            message = "航线中文名称长度最大为50"
    ) String laneNameCn;
    @Schema(
            description = "航线英文名称",
            requiredMode = Schema.RequiredMode.REQUIRED
    )
    private @NotBlank(
            message = "航线英文名称不能为空"
    ) @Length(
            max = 50,
            message = "航线英文名称长度最大为50"
    ) String laneNameEn;
    @Schema(
            description = "航线简称"
    )
    private @Length(
            max = 50,
            message = "航线简称长度最大为50"
    ) String laneNameS;
    @Schema(
            description = "航线类型，查数据字典",
            requiredMode = Schema.RequiredMode.REQUIRED,
            example = "1"
    )
    private @NotBlank(
            message = "航线类型，查数据字典不能为空"
    ) @Length(
            max = 10,
            message = "航线类型最大长度为10"
    ) String laneType;
    @Schema(
            description = "航线服务类型，查数据字典",
            requiredMode = Schema.RequiredMode.REQUIRED,
            example = "1"
    )
    private @NotBlank(
            message = "航线服务类型，查数据字典不能为空"
    ) @Length(
            max = 10,
            message = "航线服务类型最大长度为10"
    ) String laneServiceType;
    @Schema(
            description = "经营主体，查数据字典"
    )
    private @Length(
            max = 10,
            message = "经营主体最大长度为10"
    ) String businessEntity;
    @Schema(
            description = "航线开始时间",
            requiredMode = Schema.RequiredMode.REQUIRED
    )
    private @NotNull(
            message = "航线开始时间不能为空"
    ) LocalDate startDate;
    @Schema(
            description = "航线结束时间",
            requiredMode = Schema.RequiredMode.REQUIRED
    )
    private @NotNull(
            message = "航线结束时间不能为空"
    ) LocalDate endDate;
    @Schema(
            description = "状态，true:启用，false:停用",
            requiredMode = Schema.RequiredMode.REQUIRED,
            example = "true"
    )
    private @NotNull(
            message = "状态，不能为空"
    ) Boolean enabled;
    @Schema(
            description = "备注",
            example = "你说的对"
    )
    private @Length(
            max = 255,
            message = "备注最大长度为255"
    ) String remark;
}
